#include "fuel_refund_struct_csv.hpp"
#include "type_conversion.hpp"


fuel_refund_struct_csv::fuel_refund_struct_csv(std::vector<std::string> const& v)
{
		
	   switch(v.size()-1)
 	   {
		case DATE_TO:	
			set_toDate(date_input_string::to_date(v[DATE_TO]));
		case DATE_FROM:	
			set_fromDate(date_input_string::to_date(v[DATE_FROM]));
		case AMOUNT:
			set_amount(type_conversion<float>::to_number(v[AMOUNT]));
		case FUEL_ID:
			set_fuel_id(type_conversion<int>::to_number(v[FUEL_ID]));
		case RANGE_ID:
			set_range_id(type_conversion<int>::to_number(v[RANGE_ID]));
		case ID:
			set_id(type_conversion<int>::to_number(v[ID]));
			break;
		default: break;
	   }
		
//		std::cout << "[fuel_refund_struct_csv.fuel_refund_struct_csv] " << *this << std::endl;
}